package cn.yqx.bankshop.goods.service.impl;

import cn.yqx.bankshop.goods.dao.BuBannerMapper;
import cn.yqx.bankshop.goods.pojo.BuBanner;
import cn.yqx.bankshop.goods.pojo.BuBannerExample;
import cn.yqx.bankshop.goods.service.BannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class BannerServiceImpl implements BannerService {
    private final static int BANNER_ENABLED_STATE = 0 ;
    @Autowired
    BuBannerMapper buBannerMapper ;
    @Override
    public List<BuBanner> getBannerList() {
        BuBannerExample example = new BuBannerExample() ;
        example.or().andStateEqualTo(BANNER_ENABLED_STATE) ;
        example.setOrderByClause("sort asc");
        return buBannerMapper.selectByExample(example);
    }
}
